package com.xzx.car_accessories.service.impl;

import com.xzx.car_accessories.dao.InventoryDao;
import com.xzx.car_accessories.dao.impl.InventoryDaoImpl;
import com.xzx.car_accessories.domain.CarAccessory;
import com.xzx.car_accessories.domain.Inventory;
import com.xzx.car_accessories.service.InventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author: geeshaw
 * @date: 2021/7/13 23:51
 * @email: shaw@bupt.edu.cn
 * @desc:
 **/

@Service
public class InventoryServiceImpl implements InventoryService {

    @Autowired
    private InventoryDaoImpl inventoryDao;

    @Override
    public int inbound(long cid, int num)
    {
        return inventoryDao.inbound(cid, num);
    }

    @Override
    public int outbound(long cid, int num)
    {
        return inventoryDao.outbound(cid, num);
    }

    @Override
    public List<Inventory> search_findpage_accessory(int pageNum, int pageSize, String searchWord)
    {
        return inventoryDao.search_findpage_accessory(pageNum, pageSize, searchWord);
    }
    @Override
    public List<Inventory> search_accessory(String searchWord)
    {
        return inventoryDao.search_accessory(searchWord);
    }

    @Override
    public List<Map<String, String>> staticInfo()
    {
        return inventoryDao.staticInfo();
    }
}
